//C语言计算时间差
#include <stdio.h>

int main() {
	int hour1, min1, s1, ss1;
	int hour2, min2, s2, ss2;
	int hour, min, s;
	int minus;
	char op1, op2, op3, op4;

	scanf("%d%c%d%c%d", &hour1, &op1, &min1, &op2, &s1);
	ss1 = s1 + min1 * 60 + hour1 * 3600;
	scanf("%d%c%d%c%d", &hour2, &op3, &min2, &op4, &s2);
	ss2 = s2 + min2 * 60 + hour2 * 3600;
	if (ss1 > ss2)
		minus = ss1 - ss2;
	else
		minus = ss2 - ss1;

	hour = minus / 3600;
	min = (minus % 3600) / 60;
	s = minus - hour * 3600 - min * 60;
	printf("%02d:%02d:%02d", hour, min, s);
	return 0;
}
